//
//  ViewController.swift
//  delegate
//
//  Created by macvivi on 2021/10/29.
//

import UIKit

class ViewController: UIViewController, TestViewDelegate {
    func getLabelText(labelText: String) -> UIColor {
        print(labelText)
        return color
    }

    let color = UIColor.yellow
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        let arr = Bundle.main.loadNibNamed("TestView", owner: nil, options: nil)
        let testView:TestView = arr![0] as! TestView
        testView.delegate = self
        
        
        testView.center = view.center
        view.addSubview(testView)
    }


}

